package bean;

import dao.IDIF;

/**
 * A base class for Media for manipulation of the data
 * @author Anne Lorayne, Laura Dutra, Otavio Lima
 *
 */
public class MediaBean implements IDIF{

	private String Id;
	 
	private String URL;
	
	private String description;
	
	private MediaType type;
	
	private String owner;
	 
	/**
	 * @return the type
	 */
	public MediaType getType() {
		return type;
	}

	/**
	 * @param type the type to set
	 */
	public void setType(MediaType type) {
		this.type = type;
	}

	/**
	 * Constructor of the class
	 * @param ID
	 * @param URL
	 */
	public MediaBean(String ID, String URL, String description, MediaType type, String owner){
		this.Id = ID;
		this.URL = URL;
		this.description = description;
		this.type = type;
		this.owner = owner;
		
	}
	
	public MediaBean(){}
	
	// ------Getters and Setters------
	
	public String getId() {
		return Id;
	}
	

	public void setId(String iD) {
		Id = iD;
	}

	public String getURL() {
		return URL;
	}

	public void setURL(String URL) {
		this.URL = URL;
	}
	
	 
	/**
	 * @return the description
	 */
	public String getDescription() {
		return description;
	}

	/**
	 * @param description the description to set
	 */
	public void setDescription(String description) {
		this.description = description;
	}
	
	/**
	 * @return the owner
	 */
	public String getOwner() {
		return owner;
	}

	/**
	 * @param owner the owner to set
	 */
	public void setOwner(String owner) {
		this.owner = owner;
	}
	
	/* (non-Javadoc)
	 * @see java.lang.Object#equals(java.lang.Object)
	 */
	@Override
	public boolean equals(Object obj) {
		if (obj == null || !(obj instanceof MediaBean) )
			return false;
		MediaBean anotherMediaBean = (MediaBean) obj;
		
		if (this.getId().equals(anotherMediaBean.getId()))
			return true;
		
		return false;
	}

	
	
	
}
 
